import request from '/@/utils/request';

/**
 * 
 * 
 */
export function useHousingApi() {
	return {
		getHousingTreeList: (data={}) => {
			return request<any, AjaxResult>({
				url: '/housing/PageList',
				method: 'post',
				data,
			});
		},
		addHousing: (data={}) => {
			return request<any, AjaxResult>({
				url: '/housing/Add',
				method: 'post',
				data,
			});
		},
		editHousing: (data={}) => {
			return request<any, AjaxResult>({
				url: '/housing/Update',
				method: 'post',
				data,
			});
		},
		deleteHousing: (data={}) => {
			return request<any, AjaxResult>({
				url: '/housing/Delete',
				method: 'post',
				data,
			});
		},
		getHousing: (params?: object) => {
			return request<any, AjaxResult>({
				url: '/housing/Detail',
				method: 'get',
				params,
			});
		},
	};
}
